package com.task.core.domain.info;

import lombok.Data;

/**
 * @author 迪迦.
 * @date 2025/2/10 14:35
 */
@Data
public class DatasourceInfoOptionInfo {

  private String key;

  private String value;

  private Integer allCount;

  private Integer canUseCount;

  public DatasourceInfoOptionInfo(String key, String value, Integer allCount, Integer useCount) {
    this.key = key;
    this.value = value;
    this.allCount = allCount;
    this.canUseCount = allCount < useCount ? 0 : (allCount - useCount);
  }
}
